package com.music.service.impl;

import com.music.common.BaseResult;
import com.music.dao.CmMyHomePageFormMapper;
import com.music.entity.CmForm;
import com.music.service.CmMyHomePageFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Tong
 * @Date 2020/12/17 17:03
 */
@Service
public class CmMyHomePageFormServiceImpl implements CmMyHomePageFormService {
    @Autowired
    CmMyHomePageFormMapper cmMyHomePageFormMapper;

    @Override
    public BaseResult CmMyHomePageFormfind() {
        BaseResult baseResult = new BaseResult();
        List<CmForm> cmForms = cmMyHomePageFormMapper.CmMyHomePageFormfind();
        if(cmForms!=null){
            baseResult.setData(cmForms);
            baseResult.setCode(200);
            baseResult.setMessage("查询成功");
            return baseResult;
        }
        baseResult.setCode(201);
        baseResult.setMessage("查询失败");
        return baseResult;

    }
}
